﻿using System;
using System.Collections;
using Data_Storages;
using SSTestAPI;

namespace SSTestSample
{
    static class Program
    {
        static void Main()
        {
            var plantsList = new ArrayList
                                 {
                                     new Tree("listv", "hvoin", true, 101),
                                     new Flower("papar", true, 4, 1),
                                     new Tree("golosem", "shish", true, 51)
                                 };

            IDataStorage ids = new DSCsv("filepath.txt");

            ids.Save(plantsList);

            plantsList.Clear();

            plantsList = ids.Load();

            foreach (var t in plantsList)
            {
                Console.WriteLine(((Plant)t).getLifetime());
            }


            Console.ReadLine();
        }
    }
}
